All Packages Class Hierarchy This Package Previous Next Index
Class com.sun.java.swing.ViewportLayout
java.lang.Object
|
+----com.sun.java.swing.ViewportLayout
- public class ViewportLayout
- extends Object
- implements LayoutManager, Serializable
The default layout manager for JViewport. JViewportLayout defines
a policy for layout that should be useful for most applications.
The viewport makes its view the same size as the viewport,
however it will not make the view smaller than its minimum size.
As the viewport grows the view is kept bottom justified until
the entire view is visible, subsequently the view is kept top
justified.
Warning: serialized objects of this class will not be compatible with
future swing releases. The current serialization support is appropriate
for short term storage or RMI between Swing1.0 applications. It will
not be possible to load serialized Swing1.0 objects with future releases
of Swing. The JDK1.2 release of Swing will be the compatibility
baseline for the serialized form of Swing objects.
-
ViewportLayout()
-
-
addLayoutComponent(String, Component)
- Adds the specified component to the layout.
-
layoutContainer(Container)
- Called by the AWT when the specified container needs to be laid out.
-
minimumLayoutSize(Container)
- Returns the minimum dimensions needed to layout the components
contained in the specified target container.
-
preferredLayoutSize(Container)
- Returns the preferred dimensions for this layout given the components
in the specified target container.
-
removeLayoutComponent(Component)
- Removes the specified component from the layout.
ViewportLayout
public ViewportLayout()
addLayoutComponent
public void addLayoutComponent(String name,
Component c)
- Adds the specified component to the layout. Not used by this class.
- Parameters:
- name - the name of the component
- comp - the the component to be added
removeLayoutComponent
public void removeLayoutComponent(Component c)
- Removes the specified component from the layout. Not used by
this class.
- Parameters:
- comp - the component to remove
preferredLayoutSize
public Dimension preferredLayoutSize(Container parent)
- Returns the preferred dimensions for this layout given the components
in the specified target container.
- Parameters:
- target - the component which needs to be laid out
- Returns:
- a Dimension object containing the preferred dimensions
- See Also:
- target, minimumLayoutSize
minimumLayoutSize
public Dimension minimumLayoutSize(Container parent)
- Returns the minimum dimensions needed to layout the components
contained in the specified target container.
- Parameters:
- target - the component which needs to be laid out
- Returns:
- a Dimension object containing the minimum dimensions
- See Also:
- preferredLayoutSize
layoutContainer
public void layoutContainer(Container parent)
- Called by the AWT when the specified container needs to be laid out.
- Parameters:
- parent - the container to lay out
- Throws: AWTError
- if the target isn't the container specified to the
BoxLayout constructor
All Packages Class Hierarchy This Package Previous Next Index